package appapi.service.impl;

import appapi.Request.ApiReq.EquipApiReq;
import appapi.entity.Zhongjiao.TowerWorkDataEntity;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import appapi.dao.ElevatorDataMapper;
import appapi.entity.Zhongjiao.ElevatorDataEntity;
import appapi.service.ElevatorDataService;

import java.util.List;

/**
 * @author  djq
 * @date 2023/8/9 14:02
 * @description: 
 */

@Service
public class ElevatorDataServiceImpl implements ElevatorDataService{

    @Resource
    private ElevatorDataMapper elevatorDataMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return elevatorDataMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(ElevatorDataEntity record) {
        return elevatorDataMapper.insert(record);
    }

    @Override
    public int insertSelective(ElevatorDataEntity record) {
        return elevatorDataMapper.insertSelective(record);
    }

    @Override
    public ElevatorDataEntity selectByPrimaryKey(Long id) {
        return elevatorDataMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(ElevatorDataEntity record) {
        return elevatorDataMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(ElevatorDataEntity record) {
        return elevatorDataMapper.updateByPrimaryKey(record);
    }

    @Override
    public PageInfo<ElevatorDataEntity> selectPage(EquipApiReq req) {
        PageHelper.startPage(req.getCurrentPage(), req.getPageSize());
        List<ElevatorDataEntity> list = elevatorDataMapper.selectAll(req);
        return new PageInfo<>(list,req.getPageSize());
    }

}
